package cs1;

public class a3 {
	public int caughtSpeeding(int speed, boolean isBirthday) {
		  /*if((isBirthday&&speed<=65)||speed<=60){
		    return 0;
		  }if(speed>80||(isBirthday&&speed>85)){
		    return 2;
		  }
		  return 1;*/
		  if(!isBirthday){
		    if(speed<=60) {
		      return 0;
		    }else if(speed>60&&speed<=80){
		      return 1;
		    }return 2;
		  }else if(isBirthday){
		    if(speed<=65){
		      return 0;
		    }else if(speed>=65&&speed<=85){
		      return 1;
		    }
		  }return 2;
		}


}
